<template>
  <div class="app-container">
    <el-form label-width="120px">

      <el-form-item label="讲师名称">
          <el-input v-model="teacher.name" placeholder="请输入讲师名称"></el-input>
      </el-form-item>

      <el-form-item label="讲师资历">
        <el-input v-model="teacher.career" placeholder="请输入讲师资历"/>
      </el-form-item>

      <el-form-item label="讲师排序">
        <el-input-number v-model="teacher.sort" controls-position="right" placeholder="请输入讲师排序"></el-input-number>
      </el-form-item>

      <el-form-item label="讲师头衔">
        <el-select v-model="teacher.level" clearable placeholder="请选择讲师头衔">
          <el-option label="低级讲师" value="0"></el-option>
          <el-option label="中级讲师" value="1"></el-option>
          <el-option label="高级讲师" value="2"></el-option>
          <el-option label="首席讲师" value="3"></el-option>
        </el-select>
      </el-form-item>

      <el-form-item label="讲师简介">
        <el-input v-model="teacher.intro" :rows="10" type="textarea" placeholder="请输入讲师简介"></el-input>
      </el-form-item>

      <!-- 讲师头像：-->
      <el-form-item>
        <el-button :disabled="isDisabled"
                   type="primary"
                   @click="saveOrUpdate">保存
        </el-button>
      </el-form-item>

    </el-form>
  </div>
</template>

<script>
  export default
  {
    name:"addTeacher",
    data()
    {
      return {
        teacher:
          {
            name: '',
            sort: 0,
            level: 1,
            career: '',
            intro: '',
            avatar: ''
          },
        isDisabled:false //保存按钮是否禁用
      }
    },
    methods:
    {
      saveOrUpdate()
      {

      }
    }
  }
</script>

<style>

</style>
